const query = require('../../dbConfig/index')
const getNotice = async (ctx,next)=>{
	const res = await query(`select * from announcement where index_isuse=1`)
	ctx.body={code:0,data:res,msg:'成功'}
	next()
}
const getActivity = async (ctx,next)=>{
	const res = await query(`select * from cultrue where cultrue_cate_name='校园活动' AND cultrue_isuse=1`)
	ctx.body={code:0,data:res,msg:'成功'}
	next()
}
module.exports = {
	getNotice,
	getActivity
}